import { Component } from "react"
import { HttpGet } from '../fetch'
import axios from "axios"
const myRequest = new Request('./test.json');


class Introduction extends Component {
    constructor(props) {
        super(props);
        this.state = {
            title: "介绍也",
            html: "<span>hellow<span>"
        }
    }
    componentDidMount() {
        HttpGet("/manifest.json").then(res => res.json()).then(res => {
            console.log(res)
        })
        console.log(myRequest)
        // HttpGet(myRequest).then(res=>res.json()).then(res=>{
        //     console.log(res)
        // })
        axios.get("/baidu").then(res => {
            this.setState({
                html: res.data
            })
        })
    }
    render() {
        return (
            <div>
                <h2>{this.state.title}</h2>
                <div dangerouslySetInnerHTML={{ __html: this.state.html }}></div>
            </div>
        )
    }
}

export default Introduction;